<?php

$mKey = $_GET['mKey'];
$event = $_GET['event'];
$wl = $_GET['wl'];

if($mKey != null && $event != null){
    settype($mKey,"string");
    settype($event,"integer");
    
    $sql;
    
    if(!$wl){
        $sql = sprintf("DELETE FROM event_%s WHERE mKey = %s;", $event, $mKey);
    }else{
        $sql = sprintf("DELETE FROM event_%s_waitlist WHERE mKey = %s;", $event, $mKey);
    }
    
    $res = sendQ($sql);
    
    if($res){
        //SUCCES!!
        return true;
    }
    
    //ERROR
    return false;
   
}

?>